import { Http } from '@/utils/http'

/**
 * 获取诗歌信息
 * @returns 
 */
export function requestPoetry (data: any)  {
    return Http.request({
        url: '/out/poetry/getPoetry',
        method: 'post',
        data: data
    })
}

/**
 * 根据诗歌名称/诗句/朝代/诗人查找诗歌信息
 * @returns 
 */
export function requestSearchPoetry (data: any)  {
    return Http.request({
        url: '/out/poetry/searchPoetryByNameOrVerseDynastyOrAuthor',
        method: 'post',
        data: data
    })
}

/**
 * 根据uid删除诗歌
 * @returns 
 */
export function requestDeletePoetryById (data: any)  {
    return Http.request({
        url: '/poetry/deletePoetryById',
        method: 'post',
        data: data
    })
}

/**
 * 添加诗歌信息
 * @returns 
 */
export function requestAddPoetry (data: any)  {
    return Http.request({
        url: '/poetry/addPoetry',
        method: 'post',
        data: data
    })
}

/**
 * 根据id更改诗歌信息
 * @returns 
 */
export function requestUpadatePoetryById (data: any)  {
    return Http.request({
        url: '/poetry/updatePoetryById',
        method: 'post',
        data: data
    })
}

/**
 * 根据标签获取诗歌
 * @param data 
 * @returns 
 */
export function requestPoetryByLid (data: any)  {
    return Http.request({
        url: '/out/poetry/getPoetryByLid',
        method: 'GET',
        params: data
    })
}
